3.27 \(\int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx\)

Optimal. Leaf size=189 \[ \frac {a^2 c^4 (7 A-2 B) \cos ^5(e+f x)}{30 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}+\frac {a^2 c^4 (7 A-2 B) \sin (e+f x) \cos ^3(e+f x)}{24 f}+\frac {a^2 c^4 (7 A-2 B) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {1}{16} a^2 c^4 x (7 A-2 B)-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f} \]

[Out]

1/16*a^2*(7*A-2*B)*c^4*x+1/30*a^2*(7*A-2*B)*c^4*cos(f*x+e)^5/f+1/16*a^2*(7*A-2*B)*c^4*cos(f*x+e)*sin(f*x+e)/f+
1/24*a^2*(7*A-2*B)*c^4*cos(f*x+e)^3*sin(f*x+e)/f-1/7*a^2*B*cos(f*x+e)^5*(c^2-c^2*sin(f*x+e))^2/f+1/42*a^2*(7*A
-2*B)*cos(f*x+e)^5*(c^4-c^4*sin(f*x+e))/f

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2967, 2860, 2678, 2669, 2635, 8} \[ \frac {a^2 c^4 (7 A-2 B) \cos ^5(e+f x)}{30 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}+\frac {a^2 c^4 (7 A-2 B) \sin (e+f x) \cos ^3(e+f x)}{24 f}+\frac {a^2 c^4 (7 A-2 B) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {1}{16} a^2 c^4 x (7 A-2 B)-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^4,x]

[Out]

(a^2*(7*A - 2*B)*c^4*x)/16 + (a^2*(7*A - 2*B)*c^4*Cos[e + f*x]^5)/(30*f) + (a^2*(7*A - 2*B)*c^4*Cos[e + f*x]*S
in[e + f*x])/(16*f) + (a^2*(7*A - 2*B)*c^4*Cos[e + f*x]^3*Sin[e + f*x])/(24*f) - (a^2*B*Cos[e + f*x]^5*(c^2 -
c^2*Sin[e + f*x])^2)/(7*f) + (a^2*(7*A - 2*B)*Cos[e + f*x]^5*(c^4 - c^4*Sin[e + f*x]))/(42*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 2669

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(b*(g*Cos[
e + f*x])^(p + 1))/(f*g*(p + 1)), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x]
&& (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 2678

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(b*(g
*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m - 1))/(f*g*(m + p)), x] + Dist[(a*(2*m + p - 1))/(m + p), Int[(
g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0]
 && GtQ[m, 0] && NeQ[m + p, 0] && IntegersQ[2*m, 2*p]

Rule 2860

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> -Simp[(d*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(f*g*(m + p + 1)), x]
+ Dist[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; Fre
eQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[m + p + 1, 0]

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx &=\left (a^2 c^2\right ) \int \cos ^4(e+f x) (A+B \sin (e+f x)) (c-c \sin (e+f x))^2 \, dx\\ &=-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f}+\frac {1}{7} \left (a^2 (7 A-2 B) c^2\right ) \int \cos ^4(e+f x) (c-c \sin (e+f x))^2 \, dx\\ &=-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}+\frac {1}{6} \left (a^2 (7 A-2 B) c^3\right ) \int \cos ^4(e+f x) (c-c \sin (e+f x)) \, dx\\ &=\frac {a^2 (7 A-2 B) c^4 \cos ^5(e+f x)}{30 f}-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}+\frac {1}{6} \left (a^2 (7 A-2 B) c^4\right ) \int \cos ^4(e+f x) \, dx\\ &=\frac {a^2 (7 A-2 B) c^4 \cos ^5(e+f x)}{30 f}+\frac {a^2 (7 A-2 B) c^4 \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}+\frac {1}{8} \left (a^2 (7 A-2 B) c^4\right ) \int \cos ^2(e+f x) \, dx\\ &=\frac {a^2 (7 A-2 B) c^4 \cos ^5(e+f x)}{30 f}+\frac {a^2 (7 A-2 B) c^4 \cos (e+f x) \sin (e+f x)}{16 f}+\frac {a^2 (7 A-2 B) c^4 \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}+\frac {1}{16} \left (a^2 (7 A-2 B) c^4\right ) \int 1 \, dx\\ &=\frac {1}{16} a^2 (7 A-2 B) c^4 x+\frac {a^2 (7 A-2 B) c^4 \cos ^5(e+f x)}{30 f}+\frac {a^2 (7 A-2 B) c^4 \cos (e+f x) \sin (e+f x)}{16 f}+\frac {a^2 (7 A-2 B) c^4 \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a^2 B \cos ^5(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{7 f}+\frac {a^2 (7 A-2 B) \cos ^5(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{42 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.59, size = 163, normalized size = 0.86 \[ \frac {a^2 c^4 (105 (16 A-11 B) \cos (e+f x)+105 (8 A-5 B) \cos (3 (e+f x))+1785 A \sin (2 (e+f x))+105 A \sin (4 (e+f x))-35 A \sin (6 (e+f x))+168 A \cos (5 (e+f x))+2940 A e+2940 A f x-210 B \sin (2 (e+f x))+210 B \sin (4 (e+f x))+70 B \sin (6 (e+f x))-63 B \cos (5 (e+f x))+15 B \cos (7 (e+f x))-840 B e-840 B f x)}{6720 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^4,x]

[Out]

(a^2*c^4*(2940*A*e - 840*B*e + 2940*A*f*x - 840*B*f*x + 105*(16*A - 11*B)*Cos[e + f*x] + 105*(8*A - 5*B)*Cos[3
*(e + f*x)] + 168*A*Cos[5*(e + f*x)] - 63*B*Cos[5*(e + f*x)] + 15*B*Cos[7*(e + f*x)] + 1785*A*Sin[2*(e + f*x)]
 - 210*B*Sin[2*(e + f*x)] + 105*A*Sin[4*(e + f*x)] + 210*B*Sin[4*(e + f*x)] - 35*A*Sin[6*(e + f*x)] + 70*B*Sin
[6*(e + f*x)]))/(6720*f)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 135, normalized size = 0.71 \[ \frac {240 \, B a^{2} c^{4} \cos \left (f x + e\right )^{7} + 672 \, {\left (A - B\right )} a^{2} c^{4} \cos \left (f x + e\right )^{5} + 105 \, {\left (7 \, A - 2 \, B\right )} a^{2} c^{4} f x - 35 \, {\left (8 \, {\left (A - 2 \, B\right )} a^{2} c^{4} \cos \left (f x + e\right )^{5} - 2 \, {\left (7 \, A - 2 \, B\right )} a^{2} c^{4} \cos \left (f x + e\right )^{3} - 3 \, {\left (7 \, A - 2 \, B\right )} a^{2} c^{4} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{1680 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4,x, algorithm="fricas")

[Out]

1/1680*(240*B*a^2*c^4*cos(f*x + e)^7 + 672*(A - B)*a^2*c^4*cos(f*x + e)^5 + 105*(7*A - 2*B)*a^2*c^4*f*x - 35*(
8*(A - 2*B)*a^2*c^4*cos(f*x + e)^5 - 2*(7*A - 2*B)*a^2*c^4*cos(f*x + e)^3 - 3*(7*A - 2*B)*a^2*c^4*cos(f*x + e)
)*sin(f*x + e))/f

________________________________________________________________________________________

giac [A]  time = 0.21, size = 244, normalized size = 1.29 \[ \frac {B a^{2} c^{4} \cos \left (7 \, f x + 7 \, e\right )}{448 \, f} + \frac {1}{16} \, {\left (7 \, A a^{2} c^{4} - 2 \, B a^{2} c^{4}\right )} x + \frac {{\left (8 \, A a^{2} c^{4} - 3 \, B a^{2} c^{4}\right )} \cos \left (5 \, f x + 5 \, e\right )}{320 \, f} + \frac {{\left (8 \, A a^{2} c^{4} - 5 \, B a^{2} c^{4}\right )} \cos \left (3 \, f x + 3 \, e\right )}{64 \, f} + \frac {{\left (16 \, A a^{2} c^{4} - 11 \, B a^{2} c^{4}\right )} \cos \left (f x + e\right )}{64 \, f} - \frac {{\left (A a^{2} c^{4} - 2 \, B a^{2} c^{4}\right )} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {{\left (A a^{2} c^{4} + 2 \, B a^{2} c^{4}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} + \frac {{\left (17 \, A a^{2} c^{4} - 2 \, B a^{2} c^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4,x, algorithm="giac")

[Out]

1/448*B*a^2*c^4*cos(7*f*x + 7*e)/f + 1/16*(7*A*a^2*c^4 - 2*B*a^2*c^4)*x + 1/320*(8*A*a^2*c^4 - 3*B*a^2*c^4)*co
s(5*f*x + 5*e)/f + 1/64*(8*A*a^2*c^4 - 5*B*a^2*c^4)*cos(3*f*x + 3*e)/f + 1/64*(16*A*a^2*c^4 - 11*B*a^2*c^4)*co
s(f*x + e)/f - 1/192*(A*a^2*c^4 - 2*B*a^2*c^4)*sin(6*f*x + 6*e)/f + 1/64*(A*a^2*c^4 + 2*B*a^2*c^4)*sin(4*f*x +
 4*e)/f + 1/64*(17*A*a^2*c^4 - 2*B*a^2*c^4)*sin(2*f*x + 2*e)/f

________________________________________________________________________________________

maple [B]  time = 0.57, size = 463, normalized size = 2.45 \[ \frac {a^{2} A \,c^{4} \left (f x +e \right )+4 B \,a^{2} c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {B \,a^{2} c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a^{2} A \,c^{4} \cos \left (f x +e \right )-2 B \,a^{2} c^{4} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 a^{2} A \,c^{4} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-\frac {B \,a^{2} c^{4} \left (\frac {16}{5}+\sin ^{6}\left (f x +e \right )+\frac {6 \left (\sin ^{4}\left (f x +e \right )\right )}{5}+\frac {8 \left (\sin ^{2}\left (f x +e \right )\right )}{5}\right ) \cos \left (f x +e \right )}{7}-2 B \,a^{2} c^{4} \left (-\frac {\left (\sin ^{5}\left (f x +e \right )+\frac {5 \left (\sin ^{3}\left (f x +e \right )\right )}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+\frac {B \,a^{2} c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-a^{2} A \,c^{4} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+a^{2} A \,c^{4} \left (-\frac {\left (\sin ^{5}\left (f x +e \right )+\frac {5 \left (\sin ^{3}\left (f x +e \right )\right )}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+\frac {2 a^{2} A \,c^{4} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-a^{2} A \,c^{4} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-B \,a^{2} c^{4} \cos \left (f x +e \right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4,x)

[Out]

1/f*(a^2*A*c^4*(f*x+e)+4*B*a^2*c^4*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+1/3*B*a^2*c^4
*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a^2*A*c^4*cos(f*x+e)-2*B*a^2*c^4*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-4/3
*a^2*A*c^4*(2+sin(f*x+e)^2)*cos(f*x+e)-1/7*B*a^2*c^4*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos
(f*x+e)-2*B*a^2*c^4*(-1/6*(sin(f*x+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)+5/16*f*x+5/16*e)+1/5*B*a^
2*c^4*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)-a^2*A*c^4*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+
3/8*f*x+3/8*e)+a^2*A*c^4*(-1/6*(sin(f*x+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)+5/16*f*x+5/16*e)+2/5
*a^2*A*c^4*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)-a^2*A*c^4*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)
-B*a^2*c^4*cos(f*x+e))

________________________________________________________________________________________

maxima [B]  time = 0.34, size = 460, normalized size = 2.43 \[ \frac {896 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} A a^{2} c^{4} + 8960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} c^{4} + 35 \, {\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{4} - 210 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{4} - 1680 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{4} + 6720 \, {\left (f x + e\right )} A a^{2} c^{4} + 192 \, {\left (5 \, \cos \left (f x + e\right )^{7} - 21 \, \cos \left (f x + e\right )^{5} + 35 \, \cos \left (f x + e\right )^{3} - 35 \, \cos \left (f x + e\right )\right )} B a^{2} c^{4} + 448 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a^{2} c^{4} - 2240 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c^{4} - 70 \, {\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{4} + 840 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{4} - 3360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{4} + 13440 \, A a^{2} c^{4} \cos \left (f x + e\right ) - 6720 \, B a^{2} c^{4} \cos \left (f x + e\right )}{6720 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4,x, algorithm="maxima")

[Out]

1/6720*(896*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*A*a^2*c^4 + 8960*(cos(f*x + e)^3 - 3*cos(
f*x + e))*A*a^2*c^4 + 35*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 9*sin(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*A*a
^2*c^4 - 210*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*c^4 - 1680*(2*f*x + 2*e - sin(2*f*x
 + 2*e))*A*a^2*c^4 + 6720*(f*x + e)*A*a^2*c^4 + 192*(5*cos(f*x + e)^7 - 21*cos(f*x + e)^5 + 35*cos(f*x + e)^3
- 35*cos(f*x + e))*B*a^2*c^4 + 448*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*c^4 - 2240*(
cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*c^4 - 70*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 9*sin(4*f*x + 4*e) - 4
8*sin(2*f*x + 2*e))*B*a^2*c^4 + 840*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c^4 - 3360*(
2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^2*c^4 + 13440*A*a^2*c^4*cos(f*x + e) - 6720*B*a^2*c^4*cos(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 14.89, size = 553, normalized size = 2.93 \[ \frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}\,\left (4\,A\,a^2\,c^4-2\,B\,a^2\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (12\,A\,a^2\,c^4-2\,B\,a^2\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}\,\left (8\,A\,a^2\,c^4-8\,B\,a^2\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {8\,A\,a^2\,c^4}{5}-\frac {8\,B\,a^2\,c^4}{5}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{13}\,\left (\frac {9\,A\,a^2\,c^4}{8}+\frac {B\,a^2\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (16\,A\,a^2\,c^4-16\,B\,a^2\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {29\,A\,a^2\,c^4}{6}-\frac {11\,B\,a^2\,c^4}{3}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}\,\left (\frac {29\,A\,a^2\,c^4}{6}-\frac {11\,B\,a^2\,c^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {44\,A\,a^2\,c^4}{5}-\frac {14\,B\,a^2\,c^4}{5}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (\frac {23\,A\,a^2\,c^4}{24}+\frac {31\,B\,a^2\,c^4}{12}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,\left (\frac {23\,A\,a^2\,c^4}{24}+\frac {31\,B\,a^2\,c^4}{12}\right )+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {9\,A\,a^2\,c^4}{8}+\frac {B\,a^2\,c^4}{4}\right )+\frac {4\,A\,a^2\,c^4}{5}-\frac {18\,B\,a^2\,c^4}{35}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{14}+7\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}+21\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+35\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+35\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+21\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+7\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {a^2\,c^4\,\mathrm {atan}\left (\frac {a^2\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (7\,A-2\,B\right )}{8\,\left (\frac {7\,A\,a^2\,c^4}{8}-\frac {B\,a^2\,c^4}{4}\right )}\right )\,\left (7\,A-2\,B\right )}{8\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))^4,x)

[Out]

(tan(e/2 + (f*x)/2)^12*(4*A*a^2*c^4 - 2*B*a^2*c^4) + tan(e/2 + (f*x)/2)^8*(12*A*a^2*c^4 - 2*B*a^2*c^4) + tan(e
/2 + (f*x)/2)^10*(8*A*a^2*c^4 - 8*B*a^2*c^4) + tan(e/2 + (f*x)/2)^2*((8*A*a^2*c^4)/5 - (8*B*a^2*c^4)/5) - tan(
e/2 + (f*x)/2)^13*((9*A*a^2*c^4)/8 + (B*a^2*c^4)/4) + tan(e/2 + (f*x)/2)^6*(16*A*a^2*c^4 - 16*B*a^2*c^4) + tan
(e/2 + (f*x)/2)^3*((29*A*a^2*c^4)/6 - (11*B*a^2*c^4)/3) - tan(e/2 + (f*x)/2)^11*((29*A*a^2*c^4)/6 - (11*B*a^2*
c^4)/3) + tan(e/2 + (f*x)/2)^4*((44*A*a^2*c^4)/5 - (14*B*a^2*c^4)/5) + tan(e/2 + (f*x)/2)^5*((23*A*a^2*c^4)/24
 + (31*B*a^2*c^4)/12) - tan(e/2 + (f*x)/2)^9*((23*A*a^2*c^4)/24 + (31*B*a^2*c^4)/12) + tan(e/2 + (f*x)/2)*((9*
A*a^2*c^4)/8 + (B*a^2*c^4)/4) + (4*A*a^2*c^4)/5 - (18*B*a^2*c^4)/35)/(f*(7*tan(e/2 + (f*x)/2)^2 + 21*tan(e/2 +
 (f*x)/2)^4 + 35*tan(e/2 + (f*x)/2)^6 + 35*tan(e/2 + (f*x)/2)^8 + 21*tan(e/2 + (f*x)/2)^10 + 7*tan(e/2 + (f*x)
/2)^12 + tan(e/2 + (f*x)/2)^14 + 1)) + (a^2*c^4*atan((a^2*c^4*tan(e/2 + (f*x)/2)*(7*A - 2*B))/(8*((7*A*a^2*c^4
)/8 - (B*a^2*c^4)/4)))*(7*A - 2*B))/(8*f)

________________________________________________________________________________________

sympy [A]  time = 15.02, size = 1210, normalized size = 6.40 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**4,x)

[Out]

Piecewise((5*A*a**2*c**4*x*sin(e + f*x)**6/16 + 15*A*a**2*c**4*x*sin(e + f*x)**4*cos(e + f*x)**2/16 - 3*A*a**2
*c**4*x*sin(e + f*x)**4/8 + 15*A*a**2*c**4*x*sin(e + f*x)**2*cos(e + f*x)**4/16 - 3*A*a**2*c**4*x*sin(e + f*x)
**2*cos(e + f*x)**2/4 - A*a**2*c**4*x*sin(e + f*x)**2/2 + 5*A*a**2*c**4*x*cos(e + f*x)**6/16 - 3*A*a**2*c**4*x
*cos(e + f*x)**4/8 - A*a**2*c**4*x*cos(e + f*x)**2/2 + A*a**2*c**4*x - 11*A*a**2*c**4*sin(e + f*x)**5*cos(e +
f*x)/(16*f) + 2*A*a**2*c**4*sin(e + f*x)**4*cos(e + f*x)/f - 5*A*a**2*c**4*sin(e + f*x)**3*cos(e + f*x)**3/(6*
f) + 5*A*a**2*c**4*sin(e + f*x)**3*cos(e + f*x)/(8*f) + 8*A*a**2*c**4*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) -
4*A*a**2*c**4*sin(e + f*x)**2*cos(e + f*x)/f - 5*A*a**2*c**4*sin(e + f*x)*cos(e + f*x)**5/(16*f) + 3*A*a**2*c*
*4*sin(e + f*x)*cos(e + f*x)**3/(8*f) + A*a**2*c**4*sin(e + f*x)*cos(e + f*x)/(2*f) + 16*A*a**2*c**4*cos(e + f
*x)**5/(15*f) - 8*A*a**2*c**4*cos(e + f*x)**3/(3*f) + 2*A*a**2*c**4*cos(e + f*x)/f - 5*B*a**2*c**4*x*sin(e + f
*x)**6/8 - 15*B*a**2*c**4*x*sin(e + f*x)**4*cos(e + f*x)**2/8 + 3*B*a**2*c**4*x*sin(e + f*x)**4/2 - 15*B*a**2*
c**4*x*sin(e + f*x)**2*cos(e + f*x)**4/8 + 3*B*a**2*c**4*x*sin(e + f*x)**2*cos(e + f*x)**2 - B*a**2*c**4*x*sin
(e + f*x)**2 - 5*B*a**2*c**4*x*cos(e + f*x)**6/8 + 3*B*a**2*c**4*x*cos(e + f*x)**4/2 - B*a**2*c**4*x*cos(e + f
*x)**2 - B*a**2*c**4*sin(e + f*x)**6*cos(e + f*x)/f + 11*B*a**2*c**4*sin(e + f*x)**5*cos(e + f*x)/(8*f) - 2*B*
a**2*c**4*sin(e + f*x)**4*cos(e + f*x)**3/f + B*a**2*c**4*sin(e + f*x)**4*cos(e + f*x)/f + 5*B*a**2*c**4*sin(e
 + f*x)**3*cos(e + f*x)**3/(3*f) - 5*B*a**2*c**4*sin(e + f*x)**3*cos(e + f*x)/(2*f) - 8*B*a**2*c**4*sin(e + f*
x)**2*cos(e + f*x)**5/(5*f) + 4*B*a**2*c**4*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) + B*a**2*c**4*sin(e + f*x)**
2*cos(e + f*x)/f + 5*B*a**2*c**4*sin(e + f*x)*cos(e + f*x)**5/(8*f) - 3*B*a**2*c**4*sin(e + f*x)*cos(e + f*x)*
*3/(2*f) + B*a**2*c**4*sin(e + f*x)*cos(e + f*x)/f - 16*B*a**2*c**4*cos(e + f*x)**7/(35*f) + 8*B*a**2*c**4*cos
(e + f*x)**5/(15*f) + 2*B*a**2*c**4*cos(e + f*x)**3/(3*f) - B*a**2*c**4*cos(e + f*x)/f, Ne(f, 0)), (x*(A + B*s
in(e))*(a*sin(e) + a)**2*(-c*sin(e) + c)**4, True))

________________________________________________________________________________________